package com.example.carefree_server.service.impl.i_departmentImpl;

import com.example.carefree_server.entity.Tweet;
import com.example.carefree_server.mapper.m_departmentMapper.ArticleMapper;
import com.example.carefree_server.service.s_departmentService.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Service
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    private ArticleMapper articlemapper;

    @Override
    public void addArticle(Tweet t) {
        articlemapper.addArticle(t);
    }

    @Override
    public void updateArticle(Tweet t) {
       articlemapper.updateArticle(t);
    }

    @Override
    public void deleteArticle(Integer tid) {
        articlemapper.deleteArticle(tid);
    }

    @Override
    public List<Tweet> selectAll() {
        return articlemapper.selectAll();
    }

    @Override
    public Tweet select(Integer tid) {
        return articlemapper.select(tid);
    }

    @Override
    public List<Tweet> selectByDid(String did) {
        return articlemapper.selectByDid(did);
    }
}
